Skip to content

fix: refactor process aggregation to a shared core reader - #132

Merged
cdsap merged 1 commit into
mainfrom
issue/131-hermes-refactor-process-aggregation-to-a-sh-a1
Sep 17, 2026
Merged

cdsap merged 1 commit into
mainfrom
issue/131-hermes-refactor-process-aggregation-to-a-sh-a1

Conversation

@cdsap

@cdsap cdsap commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

Problem

DevelocityWrapperConfiguration.kt and InfoKotlinProcessBuildService.kt independently construct ConsolidateProcesses and apply TypeProcess.Kotlin, duplicating core behavior inside infrastructure adapters.

Why this matters

The aggregation rule can drift between console and Build Scan output, and direct parser coupling makes the core behavior harder to unit test independently.

Proposed change

Introduce a small KotlinProcessReader that owns process consolidation and Kotlin filtering. Inject or call it from both reporting adapters while preserving provider evaluation timing and output behavior.

Notes

This creates a narrow domain boundary: process aggregation is core behavior, while console and Develocity classes remain infrastructure adapters. Current validation: ktlintCheck passes; test currently reports 8 failures in InfoKotlinProcessPluginTest before any refactor.

Fixes #131

Changes

  • src/main/kotlin/io/github/cdsap/kotlinprocess/DevelocityWrapperConfiguration.kt
  • src/main/kotlin/io/github/cdsap/kotlinprocess/InfoKotlinProcessBuildService.kt
  • src/main/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessCollector.kt
  • src/main/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessReader.kt
  • src/test/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessCollectorTest.kt
  • src/test/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessReaderTest.kt

Verification

  • ./gradlew ktlintCheck
  • ./gradlew test

@cdsap
cdsap merged commit 75e6cb6 into main Sep 17, 2026
23 checks passed
@cdsap
cdsap deleted the issue/131-hermes-refactor-process-aggregation-to-a-sh-a1 branch September 17, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor process aggregation to a shared core reader

1 participant